1. Field of the Invention
The present invention relates to a method of downloading a main code to a flash memory and, more particularly, to a method of downloading a main code to a flash memory, which divides a main code into a plurality of portions and downloads the portions of the main code to a flash memory
2. Description of the Related Art
In general, ROMs are nonvolatile memories which are not erased even when turned them off. ROMs include a mask ROM, which is programmed by a manufacturer, and an electronically erasable programmable read-only memory (EEPROM), which is electronically programmable and erasable repeatedly.
A flash memory is an improved version of an EEPROM. The flash memory is erasable at one time or in a plurality of stages in units of blocks or sectors or in units of bits of a program stored therein. The structure of the flash memory is similar to the structure of a disc-type auxiliary memory device, which is divided into a plurality of sectors and formatted in units of the sectors.
A main code is downloaded to the flash memory. The main code enables the flash memory to perform printed circuit board (PCB) operations. Here, the PCB operations are basic operations that are performed in the flash memory when the flash memory is turned on, such as a test operation.
FIGS. 1A through 1C are diagrams illustrating a conventional method of downloading a main code to a flash memory. Referring to FIG. 1A, a main code 120 and a flash loader code 110 are integrated into an integration code 130. The flash loader code 110 is a code needed for writing the main code 120 to a flash memory 150.
Referring to FIG. 1B, the integration code 130 is downloaded to a buffer 140. Referring to FIG. 1C, the flash loader code 110 contained in the integration code 130 enables only the main code 120 to be downloaded to the flash memory 150.
In a conventional engine chip (CPU), a buffer is larger than a flash memory, and thus, a main code can be downloaded to the flash memory at one time using the conventional method of downloading a main code to a flash memory.
However, the conventional method of downloading a main code to a flash memory has a problem for an engine chip having a flash memory larger than a buffer. In other words, according to the conventional method of downloading a main code to a flash memory, it is impossible to use the entire storage capacity of a flash memory when an engine chip has a flash memory larger than a buffer.